package com.siki.api.service.Impl;

import com.siki.api.dao.DeptMapper;
import com.siki.api.pojo.Dept;
import com.siki.api.service.DeptService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    private final DeptMapper deptMapper;

    public DeptServiceImpl(DeptMapper deptMapper) {
        this.deptMapper = deptMapper;
    }


    @Override
    public boolean addDept(Dept dept) {
        return deptMapper.addDept(dept);
    }

    @Override
    public List<Dept> queryAllDept() {
        return deptMapper.queryAllDept();
    }

    @Override
    public Dept queryDept(Long id) {
        Dept dept = deptMapper.queryDept(id);
        return dept;
    }
}
